Skip to content

fix(desktop): local-session 403 no longer forces register/login - #88

Merged
XYAIStudio merged 3 commits into
mainfrom
cursor/desktop-local-session-403-150a
Sep 20, 2026
Merged

XYAIStudio merged 3 commits into
mainfrom
cursor/desktop-local-session-403-150a

Conversation

@XYAIStudio

@XYAIStudio XYAIStudio commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Do not run FreeOS Desktop Package, GitHub Release, workflow_dispatch packaging, or installer upload. This PR has no desktop/** files so the path filter should not start packaging. Coordinator merge only; pack after on-machine verify + user OK.

#87 was closed to stop packaging. If Actions run 35525031422 (FreeOS Desktop Package on the old head) is still in flight, ignore / cancel it — do not attach those artifacts to a Release.

Summary

Desktop 0.0.4 still showed the old register/login wall because POST /api/auth/local-session returned 403 Forbidden. After the 403 is fixed, the product path is authoritative:

Open app → optional cloud key / local model (skippable) → chat with the first agent (/chat/main). No register/login in between. Do not stop on /projects.

What changed

  • Loopback / *.localhost / Origin-or-Referer-on-this-device always adopt a studio session (guest or preferred existing admin). Remote clients still get 403.
  • SPA captures ?desktop=1 at boot (the //projects dump must not drop the shell flag).
  • After local-session succeeds: first launch → /setup (model step, skippable) → /chat/main. Returning this-device users with providers also land on /chat/main, not the conversation list and not /login.
  • /setup no longer bounces a local guest to /login once setup_required is false.
  • Empty Authorization: Bearer is no longer forwarded to organization identity.

Before / after

Before After
Fresh desktop local-session 403 → register/login guest JWT → optional model → /chat/main
Returning ~/.freeos, no JWT 403 → login studio JWT → optional model if needed, else /chat/main
SPA / dump /projects became home local-session leaves /projects for setup or /chat/main
Remote Host: example.com 403 403 (unchanged)

Target branch

  • Base is main (urgent desktop hotfix; user-requested)

Type of change

  • Bug fix

Test plan

  • uv run pytest tests/unit/users/test_local_session.py tests/integration/test_local_session.py — 17 passed
  • uv run pytest tests/unit/api/test_jwt_auth_middleware.py tests/unit/api/test_org_identity.py tests/unit/test_org_integration.py — 15 passed
  • npx vitest run AuthGuard / Login / Setup / desktopOnboarding / desktopShell — 24 passed (latest landing-path tests)
  • npx tsc --noEmit in dashboard/
  • make all (CI on this PR)
  • CHANGELOG Unreleased

Checklist

  • Updated CHANGELOG.md (if user-facing)
  • README / docs updated (if needed)
Open in Web Open in Cursor 

cursoragent and others added 3 commits September 20, 2026 17:10
Packaged WebView retries of POST /api/auth/local-session were returning
403 when the existing ~/.freeos DB had more than one user or OCTOP_DESKTOP
was shadowed on Windows, then AuthGuard dropped into register/login.

Issue a studio JWT on this device (loopback, *.localhost, Origin, or
desktop env), overlay launch env so Windows keeps OCTOP_DESKTOP=1, and
remember ?desktop=1 before the SPA replaces / with /projects.

Co-authored-by: XYAI Labs <haoboy8@gmail.com>
After a successful local-session, first launch always opens optional
model setup then the first agent. /setup no longer bounces to /login
once the guest exists (setup_required is already false). Drop the Go
host env overlay from this branch so the PR does not match desktop/**
and will not start FreeOS Desktop Package.

Co-authored-by: XYAI Labs <haoboy8@gmail.com>
Product path after a this-device session: optional model setup
(skippable), then /chat/main. The SPA dump from / to /projects must
not become home, and must not reopen the login wall.

Co-authored-by: XYAI Labs <haoboy8@gmail.com>
@XYAIStudio
XYAIStudio merged commit 071ec87 into main Sep 20, 2026
5 checks passed
@XYAIStudio
XYAIStudio deleted the cursor/desktop-local-session-403-150a branch September 20, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants